﻿using System.Collections.Generic;

namespace Magellan.Routing
{
    public class RouteValidationResult
    {
        private readonly bool _success;
        private readonly string[] _errors;

        protected RouteValidationResult(bool success, params string[] errors)
        {
            _success = success;
            _errors = errors;
        }

        public static RouteValidationResult Successful()
        {
            return new RouteValidationResult(true);
        }

        public static RouteValidationResult Failure(params string[] errors)
        {
            return new RouteValidationResult(false, errors);
        }

        public bool Success
        {
            get { return _success; }
        }

        public IList<string> Errors
        {
            get { return _errors; }
        }
    }
}
